<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计数器</title>
</head>
<style>
    body{
       background-color: #FCFC62; 
    }
    .wrapper{
        width: 95%;
        height: 96vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .main{
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 600px;
        min-height: 350px;
        margin: auto;
        padding: 25px;
        text-align: center;
        background-color: #FEFFEA;
        border-radius: 6px;
        border: 5px solid black;
        color: #bbb;
    }
    h1{
        color: black;
        margin: 0;
    }
    #count{
        margin: 10% 0;
        color: black;
        font-size: 78px;
        font-weight: 600;
    }
    .btn{
      display: inline-block;      
    }
    .btn button{
       display: inline-block;
       font-weight: 400;
       text-align: center; 
       border: 1px solid #a3a3a3;
       border-radius: .23rem;
       line-height: 1.5;
       font-size: 1rem;
       padding: .375rem .75rem;
       margin: 0 .1rem;
       cursor: pointer;
    }
    button:hover{
        background-color: lightskyblue;
        color: white;
        border: none;
    }
</style>
<body>
    <div class="wrapper">
        <div class="main">
            <h1>COUNTER</h1>
            <div id="count">0</div>
            <div class="btn">
                <button onclick="add()">Icrease</button>
                <button onclick="dcrease()">Dcrease</button>
            </div>
        </div>
    </div>
    <script>
        var i = 0;
        function add(){
            i++;
            document.getElementById("count").innerHTML= i;
        }
        function dcrease(){
            i--;
            document.getElementById("count").innerHTML= i;
        }
    </script>
</body>
</html>